package WebModule::Province;

use strict;

use base qw(WebModule);

__PACKAGE__->meta->setup(
    table   => 'province',

    columns => [
        id       => { type => 'serial', not_null => 1 },
        province => { type => 'varchar', length => 12, not_null => 1 },
        url      => { type => 'varchar', length => 200, not_null => 1 },
        have_get => { type => 'integer', default => '0', not_null => 1 },
    ],

    primary_key_columns => [ 'id' ],

    relationships=>[
        citys=> {
            type=>'one to many',
            class=>'WebModule::City',
            column_map=>{ id=>'province'},
        },
    ]
);

1;

